import { Component } from 'react';
import classNames from 'classnames';
import styles from './SearchSetting.less';
import Modal from '../../../components/modals/BaseModal';
import { Checkbox,Label,Radio,RadioGroup } from "@blueprintjs/core";

export default (props) => {
    const  { title, isOpen, className, handleClose,house,handleRoadChange,
		road,handleHouseChange,build,communities,handleBuildChange,handleCommunitiesChange,match,handleMatchChange} = props;
    return (
        <Modal className={classNames(styles.setting)}
            icon="cog"
            confirm = {false}
            title = {title || '高级设置'}
			isOpen = {isOpen}
            handleClose = {handleClose}
            >
			<div className={classNames(styles.body)}>
				<Label className={classNames(styles.label)}>
					地名类型:
					<Checkbox checked={road} onChange={handleRoadChange}>
						<strong>道路街巷</strong>
					</Checkbox>
					<Checkbox checked={house} onChange={handleHouseChange}>
						<strong>城镇居民点</strong>
					</Checkbox>
					<Checkbox checked={build} onChange={handleBuildChange}>
						<strong>建筑物</strong>
					</Checkbox>
          <Checkbox checked={communities} onChange={handleCommunitiesChange}>
          	<strong>群众自治组织</strong>
          </Checkbox>
				</Label>
				<Label className={classNames(styles.label)}>
					匹配类型:
					<RadioGroup
						onChange={handleMatchChange}
						selectedValue={match}
					>
						<Radio label="全文匹配" value="1" />
						<Radio label="模糊匹配" value="2" />
					</RadioGroup>
				</Label>

			</div>
        </Modal>
    )
}
